home *** CD-ROM | disk | FTP | other *** search
/ Aminet 4 / Aminet 4 - November 1994.iso / aminet / dev / gcc / gcc260utilsdoc.lha / gnu / man / man1 / csplit.1 < prev    next >
Encoding:
Text File  |  1994-07-26  |  6.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. CSPLIT(1L)        Misc. Reference Manual Pages         CSPLIT(1L)
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      csplit - split a file into sections  determined  by  context
  10.      lines
  11.  
  12. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  13.      ccccsssspppplllliiiitttt [-sqkz] [-f prefix] [-b suffix] [ - n  digits]  [ - -
  14.      prefix=prefix] [--suffix=suffix] [--digits=digits] [--quiet]
  15.      [--silent] [--keep-files] [--elide-empty-files] [--help] [--
  16.      version] file pattern...
  17.  
  18. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.      This manual  page  documents  the  GNU  version  of  ccccsssspppplllliiiitttt.
  20.      ccccsssspppplllliiiitttt creates zero or more output files containing sections
  21.      of the given input _f_i_l_e, or the standard input if the name `
  22.      - ' is given.  By default, ccccsssspppplllliiiitttt prints the number of bytes
  23.      written to each output file after it has been created.
  24.  
  25.      The contents of the output files are determined by the  _p_a_t_-
  26.      _t_e_r_n  arguments.   An  error  occurs  if  a pattern argument
  27.      refers to a nonexistent line of the input file, such  as  if
  28.      no remaining line matches a given regular expression.  After
  29.      all the given patterns have been matched, any remaining out-
  30.      put  is copied into one last output file.  The types of pat-
  31.      tern arguments are:
  32.  
  33.           _l_i_n_e
  34.                Create an output file containing the current  line
  35.                up  to  (but  not including) line _l_i_n_e (a positive
  36.                integer) of the input  file.   If  followed  by  a
  37.                repeat  count, also create an output file contain-
  38.                ing the next _l_i_n_e lines of the input file once for
  39.                each repeat.
  40.  
  41.           /_r_e_g_e_x_p/[_o_f_f_s_e_t]
  42.                Create an output file containing the current  line
  43.                up  to  (but  not  including) the next line of the
  44.                input file that contains a match for _r_e_g_e_x_p.   The
  45.                optional  _o_f_f_s_e_t  is  a  `+'  or `-' followed by a
  46.                positive integer.  If it is given, the input up to
  47.                the matching line plus or minus _o_f_f_s_e_t is put into
  48.                the output file, and the line  after  that  begins
  49.                the next section of input.
  50.  
  51.           %_r_e_g_e_x_p%[_o_f_f_s_e_t]
  52.                Like the previous type, except that  it  does  not
  53.                create  an  output  file,  so  that section of the
  54.                input file is effectively ignored.
  55.  
  56.           {_r_e_p_e_a_t-_c_o_u_n_t}
  57.                Repeat the previous pattern _r_e_p_e_a_t-_c_o_u_n_t (a  posi-
  58.                tive integer) additional times. An asterisk may be
  59.                given in place of the (integer) repeat  count,  in
  60.  
  61.  
  62.  
  63. FSF              Last change: GNU Text Utilities                1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. CSPLIT(1L)        Misc. Reference Manual Pages         CSPLIT(1L)
  71.  
  72.  
  73.  
  74.                which  case  the preceeding pattern is repeated as
  75.                many  times  as  necessary  until  the  input   is
  76.                exausted.
  77.  
  78.      The output file names consist of a prefix followed by a suf-
  79.      fix.   By  default, the suffix is merely an ascending linear
  80.      sequence of two-digit decimal numbers starting with  00  and
  81.      ranging  up to 99, however this default may be overridden by
  82.      either the --_d_i_g_i_t_s option or by the --_s_u_f_f_i_x option.   (See
  83.      below.)   In  any  case,  concatenating  the output files in
  84.      sorted order by file name produces the original input  file,
  85.      in order.  The default output file name prefix is `xx'.
  86.  
  87.      By default, if ccccsssspppplllliiiitttt encounters  an  error  or  receives  a
  88.      hangup, interrupt, quit, or terminate signal, it removes any
  89.      output files that it has created so far before it exits.
  90.  
  91.   OOOOPPPPTTTTIIIIOOOONNNNSSSS
  92.      -_f, --_p_r_e_f_i_x=_p_r_e_f_i_x
  93.           Use _p_r_e_f_i_x as the output file name prefix string.
  94.  
  95.      -_b, --_s_u_f_f_i_x=_s_u_f_f_i_x
  96.           Use _s_u_f_f_i_x as the output file name suffix string.  When
  97.           this  option  is  specified,  the  suffix  string  must
  98.           include exactly one printf(3) style conversion specifi-
  99.           cation  (such as %d, possibly including format specifi-
  100.           cation flags, a field  width,  a  precision  specifica-
  101.           tions,  or  all  of  these  kinds  of  modifiers).  The
  102.           conversion specification must be suitable for  convert-
  103.           ing  a binary integer argument to readable form.  Thus,
  104.           only `d', 'i', `u', `o', `x', and `X' format specifiers
  105.           are  allowed.   The entire suffix string is given (with
  106.           the current output file number) to sprintf(3)  to  form
  107.           the  file name suffixes for each of the individual out-
  108.           put files in turn.  Note that when this option is used,
  109.           the --_d_i_g_i_t_s option is ignored.
  110.  
  111.      -_n, --_d_i_g_i_t_s=_d_i_g_i_t_s
  112.           Use output  file  names  containing  numbers  that  are
  113.           _d_i_g_i_t_s digits long instead of the default 2.
  114.  
  115.      -_k, --_k_e_e_p-_f_i_l_e_s
  116.           Do not remove output files when errors are encountered.
  117.  
  118.      -_z, --_e_l_i_d_e-_e_m_p_t_y-_f_i_l_e_s
  119.           Suppress the generation of  zero-length  output  files.
  120.           (In  cases  where  the  section delimiters of the input
  121.           file are supposed to mark the first lines  of  each  of
  122.           the sections, the first output file will generally be a
  123.           zero-length file unless you  use  this  option.)   Note
  124.           that  the  output file sequence numbers will always run
  125.           consecutively, starting from 0,  even  in  cases  where
  126.  
  127.  
  128.  
  129. FSF              Last change: GNU Text Utilities                2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. CSPLIT(1L)        Misc. Reference Manual Pages         CSPLIT(1L)
  137.  
  138.  
  139.  
  140.           zero-length  output  sections are suppressed due to the
  141.           use of this option.
  142.  
  143.      -_s, -_q, --_s_i_l_e_n_t, --_q_u_i_e_t
  144.           Do not print counts of output file sizes.
  145.  
  146.      --_h_e_l_p
  147.           Print a usage message and exit with a non-zero status.
  148.  
  149.      --_v_e_r_s_i_o_n
  150.           Print version information on standard output then exit.
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195. FSF              Last change: GNU Text Utilities                3
  196.  
  197.  
  198.  
  199.